//
//  MyFamilyTableVCell.m
//  AILock
//
//  Created by 谭亚明 on 2020/6/22.
//  Copyright © 2020 tym. All rights reserved.
//

#import "MyFamilyTableVCell.h"
#import "UserTool.h"
#import "UserModel.h"
#import "UIImageView+YPImage.h"
#import "FamilyModel.h"
@interface MyFamilyTableVCell ()

@property(nonatomic,weak) IBOutlet UIImageView *headImage;
@property(nonatomic,weak) IBOutlet UILabel *familyLab;
@property(nonatomic,weak) IBOutlet UILabel *roleLab;
@property(nonatomic,weak) IBOutlet UILabel *mobileLab;


@end

@implementation MyFamilyTableVCell

-(void)awakeFromNib{
    [super awakeFromNib];
    self.isWellcom = NO;
    self.headImage.layer.masksToBounds = YES;
    self.headImage.layer.cornerRadius = self.headImage.frame.size.height/2;
}

-(void)setApplyModel:(ApplyforModel *)applyModel{
    
    self.familyLab.text = applyModel.familyName;
    self.mobileLab.text = applyModel.mobile;

    [self.headImage yp_setImageUlr:[applyModel getheadImage] placeHolder:@"icon_home3"];
}

-(void)setFamilyModel:(FamilyModel *)familyModel{
    self.familyLab.text = familyModel.familyName;
    self.mobileLab.text = familyModel.mobile;
    self.roleLab.text = [familyModel getRoleStr];
    if (familyModel.image.length) {
        [self.headImage yp_setImageUlr:[familyModel getFamileHeadImage]];
    }
    
    
}

+(CGFloat)cellForHeight{
    return 70;
}

+(NSString*)identifier{
    return @"MyFamilyTableVCell";
}


@end
